<div class="user-content user-content-inter web-mgt20">
    <div class="main user-settings">
        <div class="setting-units">
           
            <div class="setting-unit" id="slideUp2">
                <div class="title">手机号
                    <div class="preview overflow-h">
                        <{$user_info[ 'mobile']?$user_info[ 'mobile']: '请设置您的手机号'}>
                    </div>
                </div>
                <a class="edit-label glyphicon glyphicon-chevron-down pdr0"></a>
                <div class="holder" <if condition="!$user_info['mobile']">style="display:block"</if>>
                    <div class="offset1">
                        <{:Widget( 'BoxSns/User/setPhone')}>
                    </div>
                </div>
            </div>

            <div class="setting-unit" id="form-info-holder" <if condition="!$data['name']">style="display:none"</if>>
                <div class="title">商户信息</div>
                <a class="edit-label glyphicon glyphicon-chevron-down pdr0"></a>
                <div class="holder" <if condition="!$data['name']"> style="display:block" </if> >
                    <form class="form-horizontal offset1" id="form-info" data-type="ajaxSubmit" action="<{:U('User/edit')}>" method="post">
                        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名：</label>
                            <div class="col-sm-8">
                                <input id="txtName" type="text" placeholder="用于提现验证，请填写真实姓名" name="name" class="form-control" maxlength="12" value="<{$data['name']}>">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">商户名：</label>
                            <div class="col-sm-8">
                                <input id="txtName"  type="text" name="store_name" class="form-control" placeholder="如：华联超市" maxlength="12" value="<{$data['store_name']}>">
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <div class="col-sm-2"></div>
                            <div class="col-sm-8">
                                <input type="submit" class="btn btn-success w80 btn" value="保存商户信息" />
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            
           
            
        </div>
    </div>
</div>
<script>
$("#uploadBtn").change(function() {
    $("#uploadText").text("上传中...");
    $("#uploadHead").submit();
})


$("#form-info").on("ajaxSubmitSuccess", function(e, content) {
       var data = JSON.parse(content);
    if (data.error == 0) {
        hiApp.alert(data.msg);
        
         hiApp.jump("/User/pay");
    } else {
        hiApp.alert(data.msg);
    }
})


$("#BindPhone").on("success", function(e, content) {
      $("#slideUp2").slideUp();
         $("#form-info-holder").slideDown();
})


$("#uploadHead").on("ajaxSubmitSuccess", function(e, content) {
    $("#uploadText").text("上传完成");
    var data = JSON.parse(content);
    if (data.error == 0) {
        $(".headimg").attr('src', data.data.file_url);
    } else {
        hiApp.alert(data.msg);
    }
})
</script>
